<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.76C-CCK-MCD Netscape [en] (X11; U; SunOS 5.8 sun4u) [Netscape]">
   <title>sunsource.netUsing command-line CVS</title>
<!-- Contents of this file are Copyright 2000, CollabNet. -->
<!-- Head -->
<!-- gridengine.sunsource.net -->
<link REL="STYLESHEET" HREF="http://www.sunsource.net/branding/style.css" TYPE="text/css">
<!-- /Head -->
<!-- Body -->
</head>
<body text="#000033" bgcolor="#FFFFFF" link="#000066" topmargin="1" leftmargin="1" marginheight="1" marginwidth="1">
<!-- /Body --><!-- Banner -->
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
<caption><!-- // header --><!-- top nav --></caption>

<tr>
<td COLSPAN="3" WIDTH="100%" HEIGHT="5" BGCOLOR="#FFCD01"><spacer type="block" height="1" width="1"></td>
</tr>

<tr>
<td COLSPAN="3" WIDTH="100%" HEIGHT="70" BGCOLOR="#336699">
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr VALIGN=BOTTOM>
<td><a href="http://www.sunsource.net/"><img SRC="sunsource.gif" BORDER=0 height=70 width=334></a></td>

<td><a href="http://www.sunsource.net/why.html"><img SRC="whyis.gif" BORDER=0 height=31 width=192></a>
<br><a href="http://www.sunsource.net/what.html"><img SRC="whatis.gif" BORDER=0 height=18 width=192></a>
<br><a href="http://www.sunsource.net/how.html"><img SRC="howto.gif" BORDER=0 height=21 width=192></a></td>

<td ALIGN=RIGHT WIDTH="100%"><a href="http://www.sun.com"><img SRC="sun.gif" BORDER=0 height=50 width=100></a></td>
</tr>
</table>
</td>
</tr>

<tr>
<td COLSPAN="3" WIDTH="100%" HEIGHT="1" BGCOLOR="#003366"><spacer type="block" height="1" width="1"></td>
</tr>

<tr>
<td COLSPAN="3" BGCOLOR="#003366">
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr>
<td><form action="http://search1.sun.com/Search/sunsource" id="fmSearch" method="post"></td>

<td ALIGN=RIGHT ROWSPAN="2" WIDTH="233" BGCOLOR="#FFFFFF"><b><nobr><font face="verdana, arial, lucida, helvetica,
sans-serif"><font size=-1>&nbsp;Search</font></font></nobr></b><input 
type="text" name="qt" size="10"><input 
id="Go" name="Go" type="image" src="http://www.sunsource.net/branding/images/go.gif" width="21" height="15" border="0"><img SRC="curve.gif" ></td>

<td ALIGN=LEFT WIDTH="444"><a href="http://www.sunsource.net/about.html"><img SRC="about.gif" BORDER=0 height=22 width=68></a><a href="http://www.sunsource.net/news.html"><img SRC="news.gif" BORDER=0 height=22 width=63></a><a href="http://www.sunsource.net/events.html"><img SRC="events.gif" BORDER=0 height=22 width=71></a><a href="http://www.sunsource.net/faq.html"><img SRC="faq.gif" BORDER=0 height=22 width=61></a><a href="http://www.sunsource.net/mailing.html"><img SRC="mailinglists.gif" BORDER=0 height=22 width=106></a><a href="http://www.sunsource.net/projects.html"><img SRC="projects.gif" BORDER=0 height=22 width=75></a></td>

<td WIDTH="100%"><spacer type="block" width="1" height="1"></td>

<td></form></td>
</tr>

<tr>
<td COLSPAN="2" WIDTH="100%" HEIGHT="8" BGCOLOR="#99CCFF"><spacer type="block" width="1" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- // top nav --><!-- /Banner -->
<table BORDER=0 CELLSPACING=0 CELLPADDING=6 WIDTH="100%" >
<tr>
<td VALIGN=TOP><!-- Nav Column --><!-- /Nav Column --></td>

<td VALIGN=TOP WIDTH="100%"><!-- project nav --><!-- Broadcast Message --><!-- /Broadcast Message --><!-- Message --><!-- /Message --><!-- Servlet-Specific template --><!-- Wrap Servlet-Specific Help -->
<table BORDER=0 CELLPADDING=3 WIDTH="100%" >
<tr>
<td><span CLASS="Header">Using command-line CVS to access project source
files</span>
<p><span CLASS="PlainText"><b>CVS tool documents: Index</b>
<ul>
<dl>
<dt>
<a href="http://gridengine.sunsource.net/project/www/docs/ddCVS.html">About
source code version control with CVS</a></dt>

<dt>
<a href="http://gridengine.sunsource.net/project/www/docs/ddCVS_cvsglossary.html">A
version control glossary</a></dt>

<dd>
<b>You are here: Using CVS to access project source files</b></dd>

<ul>
<li>
<b><a href="#cvsintro">Getting started with CVS</a>&nbsp;</b></li>

<li>
<b><a href="#accesscvs">Accessing a project's CVS repository</a>&nbsp;</b></li>

<li>
<b><a href="#gettingsource">Getting the source</a>&nbsp;</b></li>

<li>
<b><a href="#cvslog">Viewing file revision history</a></b></li>
</ul>

<dd>
<a href="http://gridengine.sunsource.net/project/www/docs/ddCVS_cvscontributing.html">Contributing
source code changes with CVS</a></dd>

<dd>
<a href="http://gridengine.sunsource.net/project/www/docs/ddCVS_cvsmanaging.html">Managing
project files and directories with CVS</a></dd>

<dt>
<a href="http://gridengine.sunsource.net/servlets/HelpTOC">Back to main
Help index</a></dt>
</dl>
</ul>

<hr NOSHADE SIZE=1><a NAME="cvsintro"></a><span CLASS="InputHeader">Getting
started with CVS</span>
<p>If you are participating in a development project on this site, you
must use CVS as the versioning control tool for project source files. This
is the first in a series of three tool documents covering information and
commands pertinent to using CVS.
<p>
<hr NOSHADE SIZE=1><a NAME="accesscvs"></a><span CLASS="InputHeader">Accessing
a project's CVS repository</span>
<p>If you do have cvs login access for a project hosted on this site, first
you must set the cvsroot to access the project's source code repository.
In your shell or terminal client, type:
<blockquote><b>:pserver:yourlogin@cvs.projectname.domain.com:/home/main_cvs_dir</b></blockquote>
substituting your login and project information.
<p>If you are only working on one project at a time, you only have to set
cvsroot the first time you log in to CVS.
<p>If you are participating in more than one project and need to access
CVS repositories located on different servers, you need to set the cvsroot
for each login session to access the correct project's source repository.
<p>If you do not have a specific cvs login but wish to look at an open
source project's source repository, you may still be able to log in to
cvs as "anonymous" by typing:
<blockquote><b>:pserver:anoncvs@cvs.projectname.domain.com:/home/main_cvs_dir</b></blockquote>
<a href="http://cvsbook.red-bean.com/cvsbook.html#Accessing_A_Repository" TARGET="_NEW">More
about accessing a CVS repository</a>
<p>To log in to CVS, use the following command:
<blockquote><b>cvs login</b></blockquote>
Enter your user password when prompted. This should be the same password
associated with your user account on this site.
<p>
<hr NOSHADE SIZE=1><span CLASS="InputHeader"><a NAME="gettingsource"></a>Getting
source files</span>
<p>To get a "working copy" of the latest source files, you must check out
the source files, a process which copies the files onto your system. First
create a directory on your local machine by typing:
<blockquote><b>mkdir my_working_dir</b> (the directory name of your choosing)
<br><b>cd my_working_dir</b></blockquote>
Then, to check out or copy source file from the repository into your newly
created local directory, type:
<blockquote><b>cvs checkout project_name</b></blockquote>
This top-level module would contain the entire source code tree (that is,
the top level directory and any subdirectories) for that part of the project.
There is a fairly common module structure for project CVS repositories
initially. As the project grows, the project's source "tree" also grows
as subdirectories are added to various modules.
<p>To obtain the source code for a particular module called "module-name"
within the project named "project_name", specify:
<blockquote><b>cvs checkout module_name/project_name</b></blockquote>
<a href="http://cvsbook.red-bean.com/cvsbook.html#Checking_Out_A_Working_Copy" TARGET="_NEW">More
about checking out a working copy of project files</a>
<p>
<hr NOSHADE SIZE=1><a NAME="cvslog"></a><span CLASS="InputHeader">Viewing
file revision history</span>
<p>Anyone with cvs read permission can view individual file histories to
track revision information by typing:
<blockquote><b>cvs log filename</b></blockquote>
The result is a display of the file's revision information, starting with
the most current revision, and includes such information as the log message,
status, working revision number, and repository revision number.
<p><a href="http://cvsbook.red-bean.com/cvsbook.html#Revision_Numbers" TARGET="_new">More
about file revision numbers</a>
<p><a NAME="cvsdiff"></a><span CLASS="HelpTextHeader">Comparing file revisions</span>
<p>To see the particulars of a file's modifications between two revisions,
after obtaining file revision numbering information from the "<b>cvs log</b>"
command's output, type:
<blockquote><b>cvs diff -r revision_# -r revision_#</b></blockquote>
The entire file contents display with lines from both versions where differences
occur marked by revision number.&nbsp;
<p><a href="http://cvsbook.red-bean.com/cvsbook.html#Finding_Out_What_You__And_Others__Did_--_update_And_diff" TARGET="_new">Finding
out what you and others did</a>
<br><a href="http://cvsbook.red-bean.com/cvsbook.html#diff" TARGET="_new">More
about diffs and options
<hr NOSHADE SIZE=1></a><a href="http://gridengine.sunsource.net/project/www/docs/ddCVS_cvscontributing.html">More
CVS help: Contributing your changes</a>
<br><a href="http://gridengine.sunsource.net/servlets/HelpTOC">Back to
main Help index</a>
<br></span></span></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Footer --><!-- footer -->
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
<tr>
<td WIDTH="100%" HEIGHT="40"><spacer type="block" height="40" width="1"></td>
</tr>

<tr>
<td WIDTH="100%" HEIGHT="4" BGCOLOR="#336699"><spacer type="block" height="4" width="1"></td>
</tr>

<tr>
<td ALIGN=CENTER WIDTH="100%" HEIGHT="20" BGCOLOR="#99CCFF"><b><font face="verdana, arial, lucida, helvetica,
sans-serif"><font color="#003366"><font size=-1><a href="http://gridengine.sunsource.net/project/www/about.html">about</a>&nbsp;
</font></font></font></b><font face="verdana, arial, lucida, helvetica,
sans-serif"><font color="#003366"><font size=-1>|<b>&nbsp;
<a href="http://gridengine.sunsource.net/project/www/news.html">news</a>&nbsp;
</b>|<b>&nbsp; <a href="http://gridengine.sunsource.net/project/www/events.html">events</a>&nbsp;
</b>|<b>&nbsp; <a href="http://gridengine.sunsource.net/project/www/faq.html">FAQ</a>&nbsp;
</b>|<b>&nbsp; <a href="http://gridengine.sunsource.net/project/www/mailing.html">mailing
lists</a>&nbsp; </b>|<b>&nbsp; <a href="http://gridengine.sunsource.net/project/www/projects.html">projects</a></b></font></font></font></td>
</tr>

<tr>
<td WIDTH="100%" HEIGHT="1" BGCOLOR="#000000"><spacer type="block" height="1" width="1"></td>
</tr>

<tr>
<td WIDTH="100%" HEIGHT="15"><spacer type="block" height="15" width="1"></td>
</tr>

<tr>
<td ALIGN=CENTER WIDTH="100%" HEIGHT="15">
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="700" >
<tr VALIGN=TOP>
<td WIDTH="95"><a href="http://www.collab.net"><img SRC="CNlabelwhite.gif" BORDER=0 height=38 width=95></a></td>

<td WIDTH="15"><spacer type="block" height="1" width="15"></td>

<td WIDTH="590"><font face="verdana, arial, lucida, helvetica, sans-serif"><font color="#336699"><font size=-2>Sun
Solaris, NetBeans, Forte, Jini, Jiro, Java, JavaBeans, JavaServer Web Developement
Kit, and JavaServer Pages are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries. Mozilla is a registered
trademark of Netscape Communications, Inc.</font></font></font></td>
</tr>
</table>
</td>
</tr>

<tr>
<td WIDTH="100%" HEIGHT="15"><spacer type="block" height="15" width="1"></td>
</tr>
</table>
<!-- // footer --><!-- /Footer -->
</body>
</html>
